package cn.com.wangluotongxin.common.eureka;

import cn.com.wangluotongxin.common.eureka.fallback.CommonClientFallback;
import cn.com.wangluotongxin.common.eureka.form.AuthPhoneCodeForm;
import cn.com.wangluotongxin.common.eureka.form.SendPhoneCodeForm;
import cn.com.wangluotongxin.common.eureka.form.SendSmsForm;
import cn.com.wangluotongxin.common.web.AjaxResult;
import cn.com.wangluotongxin.feign.FeignConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "wltx-service-common", fallback = CommonClientFallback.class, configuration = FeignConfiguration.class)
public interface CommonClient {

    @PostMapping("/servicecommon/inner/send/sms")
    AjaxResult sendSms(@RequestBody SendSmsForm smsForm);

    @PostMapping("/servicecommon/inner/send/phone/code")
    AjaxResult sendPhoneCode(@RequestBody SendPhoneCodeForm form);

    @PostMapping("/servicecommon/inner/auth/phone/code")
    AjaxResult authPhoneCode(@RequestBody AuthPhoneCodeForm form);
}
